/**
 * Created by shaotingzhou on 2017/5/9.
 */
// 统计一级下部view

import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Dimensions,
    TouchableOpacity
} from 'react-native';

import DownloadInfo from './downloadInfo/downloadInfo'  //下载情况页面
import UserInfo from './useInfo/useInfo'   //使用情况页面

var {width,height} = Dimensions.get('window');



export default class StatisicalBottom extends Component {
    render() {
        return (
            <View style={{flexDirection:'row',height:150,backgroundColor:'white',marginTop:1}}>
                <TouchableOpacity onPress={()=>this.downloadInfo()} style={{marginTop:20}}>
                    <View style={{width:width*0.5 - 0.5,alignItems:'center'}}>
                        <Text>查看近日下载情况</Text>
                    </View>
                </TouchableOpacity>
                <View style={{width:1,backgroundColor:'#AAAAAA',height:50}}></View>
                <TouchableOpacity onPress={()=>this.useInfo()} style={{alignItems:'center',marginTop:20}}>
                    <View style={{width:width*0.5 - 0.5,alignItems:'center'}}>
                        <Text>查看近日使用情况</Text>
                    </View>
                </TouchableOpacity>
            </View>
        );
    }

    downloadInfo = () =>{
        this.props.mynavigator.push({
            component:DownloadInfo
        })
    }

    useInfo = () =>{
        this.props.mynavigator.push({
            component:UserInfo
        })
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
    }
});

